/***************************************************************************
 *   Copyright (C) 2008 by BogDan Vatra                                    *
 *   bogdan@licentia.eu                                                    *
 *                                                                         *
 *   This program is free software: you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation, either version 3 of the License, or     *
 *   (at your option) any later version.                                   *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
 ***************************************************************************/
#include <QtCore>

#include "loginplugin.h"
#include "login.h"


inline void initMyResource()
{
	Q_INIT_RESOURCE(login);
}

LoginPlugin::LoginPlugin(QObject *parent) : QObject(parent)
{
	initMyResource();
}

KontAMabilWindow * LoginPlugin::createWidget(QWidget * parent)
{
	KontAMabilWindow * m_widget = new Login(parent);
	m_widget->setObjectName(name());
	return m_widget;
}

QString LoginPlugin::querys()
{
	return "";
}


QString LoginPlugin::name()
{
	return "login";
}

QString LoginPlugin::version()
{
	return "0.1";
}

QString LoginPlugin::depends()
{
	return "";
}

QString LoginPlugin::recommends()
{
	return "Contabilitate|Gestiune|Salarizare|Car";
}

QString LoginPlugin::description(const QString &)
{
	QFile f(":/login/doc.html");
	if (!f.open(QIODevice::ReadOnly))
		return QString();
	QString doc=f.readAll();
	f.close();
	return doc;
}

int LoginPlugin::order()
{
	return INT_MIN;
}


Q_EXPORT_PLUGIN2(loginPlugin, LoginPlugin);
